package multiThread.security;

import multiThread.pojo.Account;

/**
 * 模拟银行取钱
 * @projectName: java-sample
 * @description:
 * @author: Adam
 * @create: 2019-12-30 19:06
 **/

public class DrawTest {

    public static void main(String[] args){

        //创建一个账户
        Account  acct = new Account("1234567", (int) 1000);
        //模拟两个线程同时对一个账户取钱 两个线程赋值同一个对象
        new DrawThread("甲",acct,800).start();
        new DrawThread("乙",acct,800).start();

    }
}
